﻿<%@ Page Language="C#" AutoEventWireup="true" Theme="Default" CodeBehind="FaPiaoHMLIST.aspx.cs" Inherits="Web.Pages.YongShui.FaPiaoHMLIST" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>弹出框</title>
    <script type="text/javascript">
        function SetRowValue(values) {
            hdColection.Set("fphm", values);
        }
        function ConfirmChoose()
        {
            //if (hdColection.Get("fphm") == undefined) {
            //    window.returnValue = grid.GetRowKey(0);
            //}
            //else {
            var open = window.opener;
            open.SelectFapiaohm(hdColection.Get("fphm"));
                //window.returnValue = hdColection.Get("fphm");
            //}
            window.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div class="tabletitle1">
            选择发票
        </div>
                <dx:ASPxHiddenField ID="ASPxHiddenField1" ClientInstanceName="hdColection" runat="server"></dx:ASPxHiddenField>
                <dx:ASPxGridView ID="gvList" ClientInstanceName="grid" runat="server" AutoGenerateColumns="False" EnableCallBacks="false" KeyFieldName="S_FAPIAOHM" Theme="Aqua1" Width="100%">
        <Columns>
            <dx:GridViewDataTextColumn FieldName="S_FAPIAOHM" Caption="发票号码" Width="100%">
            </dx:GridViewDataTextColumn>
        </Columns>
        <Settings VerticalScrollableHeight="200" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
        <SettingsBehavior AllowSort="false" />
                    <ClientSideEvents  FocusedRowChanged="function(s, e) {   
                                                    s.GetRowValues(grid.GetFocusedRowIndex(), 'S_FAPIAOHM', SetRowValue);
                                                }" />
    </dx:ASPxGridView>
                <div style="text-align:right;"><dx:ASPxButton ID="ASPxButton1" runat="server" Text="确定" UseSubmitBehavior="false" ClientSideEvents-Click="function(s,e){ConfirmChoose();}"></dx:ASPxButton></div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
